package com.pm.entity.vo.task;

import com.pm.common.enumeration.QuarterEnum;
import lombok.Data;

@Data
public class TeamScoreRankVo {

    /**
     * 任务id
     */
    private Integer taskId;

    /**
     * 年
     */
    private String year;

    /**
     * 季度
     */
    private Integer time;

    /**
     * 月份集合
     */
    private String[] monthList;

    public void setTime(Integer time) {
        this.time = time;
        setMonthList(time);
    }

    public void setMonthList(Integer quarter) {
        switch (quarter) {
            case 1:
                this.monthList = QuarterEnum.ONE.getMonth().split(",");
                break;
            case 2:
                this.monthList = QuarterEnum.TWO.getMonth().split(",");
                break;
            case 3:
                this.monthList = QuarterEnum.THREE.getMonth().split(",");
                break;
            case 4:
                this.monthList = QuarterEnum.FOUR.getMonth().split(",");
                break;
        }
    }
}
